package com.member.shop.service.impl;

import java.util.Arrays;
import java.util.List;
        import com.member.common.utils.DateUtils;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import com.member.shop.mapper.SysBizMarketPageCategoryDataMapper;
import com.member.shop.domain.SysBizMarketPageCategoryData;
import com.member.shop.service.ISysBizMarketPageCategoryDataService;

/**
 * 营销页面分类关联数据Service业务层处理
 *
 * @author lixinchen
 * @date 2025-01-20
 */
@Service
public class SysBizMarketPageCategoryDataServiceImpl extends ServiceImpl<SysBizMarketPageCategoryDataMapper, SysBizMarketPageCategoryData> implements ISysBizMarketPageCategoryDataService
{
    @Resource
    private SysBizMarketPageCategoryDataMapper sysBizMarketPageCategoryDataMapper;

    /**
     * 查询营销页面分类关联数据
     *
     * @param id 营销页面分类关联数据主键
     * @return 营销页面分类关联数据
     */
    @Override
    public SysBizMarketPageCategoryData selectSysBizMarketPageCategoryDataById(Long id)
    {
        return sysBizMarketPageCategoryDataMapper.selectById(id);
    }

    /**
     * 查询营销页面分类关联数据列表
     *
     * @param queryWrapper 营销页面分类关联数据
     * @return 营销页面分类关联数据
     */
    @Override
    public List<SysBizMarketPageCategoryData> selectSysBizMarketPageCategoryDataList(LambdaQueryWrapper<SysBizMarketPageCategoryData> queryWrapper)
    {
        return sysBizMarketPageCategoryDataMapper.selectList(queryWrapper);
    }
    /**
     * 查询营销页面分类关联数据列表
     *
     * @param sysBizMarketPageCategoryData 营销页面分类关联数据
     * @return 营销页面分类关联数据
     */
    @Override
    public List<SysBizMarketPageCategoryData> selectSysBizMarketPageCategoryDataList(SysBizMarketPageCategoryData sysBizMarketPageCategoryData)
    {
        return sysBizMarketPageCategoryDataMapper.selectSysBizMarketPageCategoryDataList(sysBizMarketPageCategoryData);
    }
    /**
     * 新增营销页面分类关联数据
     *
     * @param sysBizMarketPageCategoryData 营销页面分类关联数据
     * @return 结果
     */
    @Override
    public int insertSysBizMarketPageCategoryData(SysBizMarketPageCategoryData sysBizMarketPageCategoryData)
    {
                sysBizMarketPageCategoryData.setCreateTime(DateUtils.getNowDate());
            return sysBizMarketPageCategoryDataMapper.insert(sysBizMarketPageCategoryData);
    }

    /**
     * 修改营销页面分类关联数据
     *
     * @param sysBizMarketPageCategoryData 营销页面分类关联数据
     * @return 结果
     */
    @Override
    public int updateSysBizMarketPageCategoryData(SysBizMarketPageCategoryData sysBizMarketPageCategoryData)
    {
                sysBizMarketPageCategoryData.setUpdateTime(DateUtils.getNowDate());
        return sysBizMarketPageCategoryDataMapper.updateById(sysBizMarketPageCategoryData);
    }

    /**
     * 批量删除营销页面分类关联数据
     *
     * @param ids 需要删除的营销页面分类关联数据主键
     * @return 结果
     */
    @Override
    public int deleteSysBizMarketPageCategoryDataByIds(Long[] ids)
    {
        return sysBizMarketPageCategoryDataMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除营销页面分类关联数据信息
     *
     * @param id 营销页面分类关联数据主键
     * @return 结果
     */
    @Override
    public int deleteSysBizMarketPageCategoryDataById(Long id)
    {
        return sysBizMarketPageCategoryDataMapper.deleteById(id);
    }
}
